<template>
	<view class="brand-page">
		<TopBar
			left-icon="/static/user.png"
			scan-icon="/static/saoyisao.png"
			menu-icon="/static/menu.png"
			@menu="toggleMenu"
		/>

		<scroll-view scroll-y class="page-scroll">
			<!-- 标题 -->
			<view class="header">
				<text class="hello">Hello, Vaglette</text>
				<!-- 顶部下方信息块，仿照其它页面的小卡片风格 -->
				<view class="info-card">
					<view class="info-left">
					<image src="/static/record/dir.png" class="info-icon" mode="aspectFit" />
						<text class="info-text">VA7585241</text>
					</view>
					<text class="info-date">23/09/2025</text>
				</view>
			</view>

			<!-- ECO-PERFORMANCE -->
			<text class="section-title">ECO-PERFORMANCE</text>
			<image src="/static/person/ECO-PERFORMANCE.png" class="section-image" mode="widthFix" />

			<!-- PASSPORTS PRODUCED -->
			<text class="section-title">PASSPORTS PRODUCED</text>
			<image src="/static/person/PASSPORTSPRODUCED.png" class="section-image" mode="widthFix" />

			<!-- PASSPORTS ACTIVATED -->
			<text class="section-title">PASSPORTS ACTIVATED</text>
			<image src="/static/person/PASSPORTSACTIVATED.png" class="section-image" mode="widthFix" />
		</scroll-view>

		<AccountMenu
			v-if="showMenu"
			:style="{ '--anchor-top': '70px', '--anchor-right': '0px' }"
			@close="showMenu = false"
			@select="() => showMenu = false"
		/>

		<CustomTabbar active="person" />
	</view>
</template>

<script setup>
import TopBar from '@/components/TopBar.vue';
import CustomTabbar from '@/components/CustomTabbar.vue';
import AccountMenu from '@/components/AccountMenu.vue';
import { ref } from 'vue';

const showMenu = ref(false);
const toggleMenu = () => { showMenu.value = !showMenu.value; };
</script>

<style lang="scss">
.brand-page { min-height: 100vh; background: linear-gradient(180deg, #d9f0ff 0%, #e9f9ed 100%); }
.page-scroll { margin-top: 60px; padding: 0 12px 84px 12px; box-sizing: border-box; }

.header { padding: 8px 4px 12px; }
.hello { display: block; font-size: 22px; font-weight: 800; color: #0b1e2a; margin-bottom: 12px; }
.info-card { display: flex; align-items: center; justify-content: space-between; background: #eaf6ff; border-radius: 12px; padding: 10px 12px; box-shadow: 0 6px 16px rgba(0,0,0,.08); }
.info-left { display: flex; align-items: center; gap: 8px; }
.info-icon { width: 18px; height: 18px; opacity: .9; }
.info-text { color: #0b1e2a; font-size: 14px; font-weight: 600; }
.info-date { color: #0b1e2a; font-size: 12px; opacity: .9; }

.section-title { display: block; margin: 18px 4px 10px; font-size: 18px; font-weight: 800; color: #0b1e2a; }
.section-image { width: calc(100% - 8px); margin: 0 4px 14px; border-radius: 14px; display: block; }

@media (min-width: 768px) {
	.page-scroll { padding-bottom: 120px; }
}
</style>


